<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?><?php
$MODEL = getcache('model','commons');
$SITE = getcache('sitelist','commons');
$SEO['site_title'] = $SITE[1]['name'];
$SEO['description'] = $SITE[1]['name'].'为你提供最新的'.$CAT[catname].'图集《'.$title.'》，并整理相关关键词'.$SEO['keyword'].'，供您查看更多相关美女写真图集！';
?>
<?php include template("content","header_page"); ?>
<div class="layui-warp">
  <div class="layui-detail">
  	<div class="layui-detail-left">
	  <div class="layui-detail-title">
		<h1 class="layui-inline"><?php echo $title;?></h1>(<i id="curpicnumber">1</i>/<span class="layui-inline"><?php echo count($pictureurls);?></span>)
		<div class="layui-detail-item">
		  <div class="layui-type"><i class="layui-icon">&#xe857;</i><span class="layui-badge"><a href="<?php echo $CAT['url'];?>" target="_blank"><?php echo $CAT['catname'];?></a></span></div>
		  <div class="layui-piccount"><i class="layui-icon">&#xe64a;</i><span class="layui-badge layui-count"><?php echo count($pictureurls);?>P</span></div>
		  <div class="layui-posttime"><i class="layui-icon">&#xe60e;</i><span class="layui-badge layui-date"><?php echo date('Y-m-d', strtotime($inputtime));?></span></div>
		  <div class="layui-read"><i class="layui-icon">&#xe613;</i><span id="hits"></span></div>
      <?php if($posids > 0) { ?><div class="layui-posids"><span class="layui-badge">荐</span></div><?php } ?>
		</div>
	  </div>
  	  <div class="layui-pic-bar">
  	  	<div class="layui-favorite"><div class="layui-badge"><i class="layui-icon" onclick="add_favorite(<?php echo $id;?>,<?php echo $modelid;?>);" href="javascript:;" >&#xe600;</i><span>添加收藏</span></div></div>
  	  	<div class="layui-enjoy"><a class="layui-heart" href="javascript:;" data-id="<?php echo $id;?>"></a><span id="enjoy">人喜欢</span></div>
		<div class="layui-prompt"><div class="layui-badge"><i class="layui-icon">&#xe60b;</i><span>点击图片切换</span></div></div>
  	  	<div class="layui-scroll" id="allpic" data-parameter="<?php echo $catid;?>-<?php echo $id;?>"><div class="layui-badge"><i class="layui-icon">&#xe60d;</i><span>一图流</span></div></div>
		<div class="layui-bigpic" id="bigpic"><div class="layui-badge"><i class="layui-icon">&#xe615;</i><span>查看原图</span></div></div>
  	  </div>
	  <div class="layui-pic-show">
		<a href="javascript:;" id="showcurpic"><img src="<?php echo $pictureurls['0']['url'];?>" data-pic="0" /></a>
	  </div>
	  <div class="layui-info">
		<div class="bdsharebuttonbox" id="share"><a class="bds_more layui-icon" href="#" data-cmd="more">&#xe641;</a></div>
		<div class="layui-copyurl">
		  <div class="layui-badge"><i class="layui-icon">&#xe64c;</i></div>
		  <div class="url"><input type="text" id="url" value="<?php echo go($catid,$id);?>" /></div>
		  <div id="copy">复制链接</div>
		</div>
		<div class="layui-tags">
		<?php pc_base::load_sys_func('iconv');?>
		  <?php $n=1;if(is_array($keywords)) foreach($keywords AS $keyword) { ?>
		  <?php $letters = gbk_to_pinyin($keyword);$letters=strtolower(implode('',$letters))?>
		  <a class="layui-icon" href="<?php echo APP_PATH;?>tags/<?php echo $letters;?>_1.html" target="_blank">&#xe66e; <?php echo $keyword;?></a>
		  <?php $n++;}unset($n); ?>
		</div>
	  </div>
    <div class="layui-nextpic">
      <div class="layui-pre"><i class="layui-icon">&#xe65a;</i><a href="<?php echo $previous_page['url'];?>" title="<?php echo $previous_page['title'];?>"><?php echo str_cut($previous_page[title],60);?></a></div>
      <div class="layui-next"><i class="layui-icon">&#xe65b;</i><a href="<?php echo $next_page['url'];?>" title="<?php echo $next_page['title'];?>"><?php echo str_cut($next_page[title],60);?></a></div>
    </div>
	  <div class="layui-about">
	  	<div class="layui-about-title"><h2>相关图集</h2></div>
	  	<div class="layui-about-box">
		  <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=c8a109eb29488882611826105410e725&action=relation&relation=%24relation&id=%24id&catid=%24catid&num=10&keywords=%24rs%5Bkeywords%5D\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">修改</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'relation')) {$data = $content_tag->relation(array('relation'=>$relation,'id'=>$id,'catid'=>$catid,'keywords'=>$rs[keywords],'limit'=>'10',));}?>
	  	  <ul>
	  	  <?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
	  		<li><span><?php echo date('Y-m-d',$r[inputtime]);?></span><a href="<?php echo $r['url'];?>" title="<?php echo $r['title'];?>" target="_blank"><?php echo $r['title'];?></a></li>
	  		<?php $n++;}unset($n); ?>
	  	  </ul>
	  	  <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
	  	</div>
	  </div>
	  <div class="layui-guess">
	  	<div class="layui-guess-title"><h2>大家都在看</h2></div>
	  	  <div class="layui-guess-box">
	  	  <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"get\" data=\"op=get&tag_md5=e67dac3d1c8f61c473b3f4de9ee312f7&sql=select+%2A+from+phpcms_picture+where+catid%3D%27%24catid%27+order+by+digg+desc&num=12\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">修改</a>";}pc_base::load_sys_class("get_model", "model", 0);$get_db = new get_model();$r = $get_db->sql_query("select * from phpcms_picture where catid='$catid' order by digg desc LIMIT 12");while(($s = $get_db->fetch_next()) != false) {$a[] = $s;}$data = $a;unset($a);?>
	  		<ul>
	  		<?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
	  	 	<li><a href="<?php echo $r['url'];?>" title="<?php echo $r['title'];?>" target="_blank"><img lay-src="<?php echo $r['thumb'];?>?x-oss-process=style/listpic" alt="<?php echo $r['title'];?>"></a></li>
	  	 	<?php $n++;}unset($n); ?>
	  		</ul>
	  	  <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
	  	  </div>
	  </div>
	  <div class="layui-comment">
<div id="SOHUCS" sid="<?php echo id_encode("content_$catid",$id,$siteid);?>" ></div>
<script charset="utf-8" type="text/javascript" src="https://changyan.sohu.com/upload/changyan.js" ></script>
<script type="text/javascript">
window.changyan.api.config({
appid: 'cyttPnySC',
conf: 'prod_091983e81b15b8a51849c71b7b2dc98c'
});
</script>			
	  </div>
  	</div>
  	<div class="layui-detail-right">
  	  <div class="layui-pbox cst-scrollbar">
  		<ul class="layui-pic-list"></ul>
  	  </div>
  	  <div class="layui-rec">
  		<div class="layui-rec-title"><a id="change" class="layui-icon" href="javascript:;" title="换一组">&#xe9aa; 换一组</a><h3>本类随机推荐</h3></div>
  		<?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=726c7619f7bd6010cc17ce438f93e3fa&action=position&posid=1&catid=%24catid&order=id+DESC&num=10\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">修改</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'position')) {$data = $content_tag->position(array('posid'=>'1','catid'=>$catid,'order'=>'id DESC','limit'=>'10',));}?>
  		<ul class="layui-rec-list">
  		  <?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
  		  <li><span><?php echo date('y/m/d',$r[inputtime]);?></span><a href="<?php echo $r['url'];?>" title="<?php echo $r['title'];?>" target="_blank"><?php echo str_cut($r[title],72);?></a></li>
  		  <?php $n++;}unset($n); ?>
  		</ul>
  		<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
  	  </div>
  	</div>
  </div>
  <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=b7a0fa8d013e9d707d92f918e63ae1f9&action=hits&catid=%24catid&num=10&order=views+DESC\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">修改</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'hits')) {$data = $content_tag->hits(array('catid'=>$catid,'order'=>'views DESC','limit'=>'10',));}?>
  <div class="layui-hot">
	<div class="layui-hotlist">
	<div class="layui-hot-title"><h2>本类热门图集</h2></div>
    <?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
    <div class="layui-box">
      <div class="layui-actions">
        <a class="layui-thumb" href="<?php echo $r['url'];?>" target="_blank"><img lay-src="<?php echo $r['thumb'];?>?x-oss-process=style/midpic" alt="<?php echo $r['title'];?>" /></a> 
      </div>
      <div class="layui-stats">
        <div class="layui-tips">
          <?php $db = pc_base::load_model('content_model');$db->table_name = $db->db_tablepre.$MODEL[$modelid]['tablename'].'_data';$_r = $db->get_one(array('id'=>$r[id])); $pictureurls = $_r[pictureurls]; ?>
          <?php $picnum = count(json_decode($pictureurls, true));?>
          <div class="layui-piccount"><i class="layui-icon">&#xe64a;</i><span class="layui-badge layui-count" data-num="<?php echo $picnum;?>"><?php echo $picnum;?>P</span></div>
          <div class="layui-posttime"><i class="layui-icon">&#xe609;</i><span class="layui-badge layui-date"><?php echo date("Y-m-d", $r[inputtime]);?></span></div>
        </div>
        <div class="layui-title">
          <h2><a href="<?php echo $r['url'];?>" title="<?php echo $r['title'];?>" target="_blank"><?php echo $r['title'];?></a></h2>
        </div>
      </div>
    </div>
    <?php $n++;}unset($n); ?>
	</div>
  </div> 
  <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
</div>
<script type="text/javascript" src="<?php echo APP_PATH;?>api.php?op=enjoy&id=<?php echo $id;?>&modelid=<?php echo $modelid;?>"></script>
<script type="text/javascript" src="<?php echo APP_PATH;?>api.php?op=count&id=<?php echo $id;?>&modelid=<?php echo $modelid;?>"></script>
<script type="text/javascript" src="<?php echo LAYUI_PATH;?>detail.js"></script>
<script type="text/javascript" src="<?php echo LAYUI_PATH;?>uaredirect.js"></script>
<script type="text/javascript">uaredirect("http://m.chunmeitu.com/detail/<?php echo $id;?>.html");</script>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
<?php include template("content","footer"); ?>